package com.alex.client;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * @Author: claud
 * @Date: 2018/8/16 14 33
 * @Description: 用于记录各个资源的代理信息的类
 */

@Slf4j
@Data
public class ProxyInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    private String userName;
    private String password;
    private String proxy;
    private String switchType;
    private String loginUrl;
    private String webId;
    private int timeout;

    /**
     * 代理ip及地址
     */
    private String proxyIp;

    private String proxyPort;

    private String proxyAcc;

    private String proxyPwd;


    public ProxyInfo(String userName, String password, String switchType) {
        this.userName = userName;
        this.password = password;
        this.switchType = switchType;
    }

    public ProxyInfo() {
        this.proxyPort = "10086";
        this.userName = "qf";
        this.password = "qf3.1415";
        this.proxyAcc = "qf";
        this.proxyPwd = "qf3.1415";
        this.switchType = "1";
    }

    /**
     * 下面的方法都是用来测试的
     */
    public static ProxyInfo getSichuanIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("111.231.192.250");
        return pi;
    }

    public static ProxyInfo getFudanIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("101.231.201.107");
        return pi;
    }

    //218.2.99.179:10086
    public static ProxyInfo getPiyansuoIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("218.2.99.179");
//        pi.setSwitchType("2");
        return pi;
    }

    public static ProxyInfo getShangjiaoIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("121.46.232.24");
//        pi.setSwitchType("2");
        return pi;
    }

    //202.192.16.45:10086
    public static ProxyInfo getGuangdaIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("202.192.16.45");
//        pi.setSwitchType("2");
        return pi;
    }

    public static ProxyInfo getgcrIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("127.0.0.1");
        pi.setProxyPort("10809");
//        pi.setSwitchType("2");
        return pi;
    }

    public static ProxyInfo getGuangzhouProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("210.38.111.23");
        return pi;
    }


    public static ProxyInfo getCnkiAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "lyzyyy";
        String pwd = "tsg123";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    public static ProxyInfo getCnkiAccountNoLimitProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "xn0086";
        String pwd = "cdd3yy";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    /**
     * ip免代理形式
     */
    public static ProxyInfo getWfIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("202.120.23.59");
//        pi.setProxyIp("101.231.201.107"); //复旦大学
//        pi.setProxyIp("202.195.214.11"); //南京中医药大学
        pi.setUserName("qf");
        pi.setPassword("qf3.1415");
        pi.setProxyPort("10086");
        pi.setSwitchType("1");
        return pi;
    }

    /**
     * 下载扣钱的万方卡形式
     */
    public static ProxyInfo getWfAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "lyzyyy";
        String pwd = "lyzyyy123";
        /**静安区精神卫生中心*/
        account = "wfzk111";
        pwd = "wfzk1234";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    /**
     * 万方下下载无限制账号
     */
    public static ProxyInfo getWfAccountNoLimitProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "qksyy9";
        String pwd = "718978";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    /**
     * 中日的ip有万方医学的权限.
     */
    public static ProxyInfo getZhongriIpProxy() {
        ProxyInfo pi = new ProxyInfo();
        pi.setProxyIp("47.95.220.101");
        String loginUrl = "http://login.med.wanfangdata.com.cn/Account/LogOnByUrl?sign=U35ecVAsVW5Vfgd6BFsCeF4nCWoJfQd9UzIBNwY0DGVSMFox";
        pi.setLoginUrl(loginUrl);
        return pi;
    }

    public static ProxyInfo getHuaianChkdNoLimitAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "hadyrmyy";
        String pwd = "hayy0501";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    public static ProxyInfo getChkdChargeAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "pdxqrmyy";
        String pwd = "rmyy123";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    public static ProxyInfo getChkdShanxirenminChargeAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "xa0302";
        String pwd = "sxrmyy";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    public static ProxyInfo getWfmedHuaianNolimitAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "hadyrmyy";
        String pwd = "hadyrmyy6666";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        /**景安的测试vps*/
        pi.setProxyIp("116.255.213.235");
        pi.setProxyAcc("qf");
        pi.setProxyPwd("qf3.1415");
        pi.setProxyPort("10086");
        return pi;
    }

    public static ProxyInfo getWfmedWuxiCashAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "wxsytsg";
        String pwd = "456123";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    public static ProxyInfo getWfmedJiangduCashAccountProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "sghlib6";
        String pwd = "sy36123762";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setSwitchType("0");
        return pi;
    }

    public static ProxyInfo getWfmedXiangyaProxy() {
        ProxyInfo pi = new ProxyInfo();
        String account = "qf";
        String pwd = "qf3.1415";
        pi.setUserName(account);
        pi.setPassword(pwd);
        pi.setProxy("202.197.83.74:10086");
        pi.setProxyIp("202.197.83.74");
        pi.setLoginUrl("http://med.wanfangdata.com.cn/AutoLogin.aspx?sign=V3heelAsVH8CKVUOUyZUKAtkBXEIclJlCGoBNlNmXTUCYw==");
        pi.setSwitchType("1");
        return pi;
    }


}
